
(***********************************************************************)
(*                                                                     *)
(*  Programowanie Funkcyjne                                            *)
(*  Wydział MiMUW                                                      *)
(*                                                                     *)
(*  Marcin Walas                                                       *)
(*  262460                                                             *)
(*                                                                     *)
(***********************************************************************)

type games_supported = Checkers | Breaktrough;;

type player_type = {
    is_human : bool;
};;

type handlers_type = { 
    mutable click_handler : (int -> int -> unit);
    mutable new_game_handler : (unit -> unit);
    mutable set_options_handler :(games_supported -> player_type -> player_type -> int -> unit);
    mutable idle_handler : (unit -> unit);
    
};;


let default_player = { is_human = false; };;


let signum x = 
    if x > 0 then 1 else (if x < 0 then -1 else 0);;

